//
//  LCYDownloadCell.m
//  EPA
//
//  Created by lanou3g on 16/4/27.
//  Copyright © 2016年 liu. All rights reserved.
//

#import "LCYDownloadCell.h"
#import "LCYDownloadManager.h"
@interface LCYDownloadCell ()
@property (weak, nonatomic) IBOutlet UILabel *titleLable;
@property (weak, nonatomic) IBOutlet UIProgressView *progressView;
@property (weak, nonatomic) IBOutlet UILabel *progressLable;

@end

@implementation LCYDownloadCell

- (void)awakeFromNib {
    // Initialization code
}

/// 展示数据
- (void)layoutSubviews {
    LCYDownloadManager *manager = [LCYDownloadManager shareDownload];
    self.titleLable.text = [manager getTitleWithIndex:self.indexPath.row];
    
    [manager setProgressBlock:^(float progress) {
        self.progressView.progress = progress;
        self.progressLable.text = [NSString stringWithFormat:@"进度:%.2f%%",progress * 100];
    } ComplateBlock:^(NSString *path) {
        
    } Index:self.indexPath.row];
    
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
